import { NativeStackNavigationOptions } from "@react-navigation/native-stack";

import Tabbar from "../screens/Tabbar/Index";
import Login from "../screens/Login/Login";
import Register from "../screens/Register/Register";
import UserDetail from "../screens/UserDetails/UserDetails";
import UserEditor from "../screens/UserEditor/UserEditor";
import UserEditorForm from "../screens/UserEditor/UserEditorForm";
import DeynamicDetails from "../screens/Dynamic/DeynamicDetails";
import DynamicPublic from "../screens/Dynamic/DynamicPublic";

type RoutesType = {
  name: string;
  options: NativeStackNavigationOptions;
  component: any;
};

export const Routes: RoutesType[] = [
  // 首页
  {
    name: "Index",
    options: {
      headerShown: false,
    },
    component: Tabbar,
  },
  // 登陆
  {
    name: "Login",
    options: {
      title: "",
      headerShadowVisible: false,
    },
    component: Login,
  },
  // 注册
  {
    name: "Register",
    options: {
      title: "",
      // headerShown: false,
      headerShadowVisible: false,
    },
    component: Register,
  },
  // 用户详情
  {
    name: "UserDetail",
    options: {
      title: "",
      headerShown: false,
    },
    component: UserDetail,
  },
  // 编辑用户
  {
    name: "UserEditor",
    options: {
      title: "个人资料",
      headerShadowVisible: false,
    },
    component: UserEditor,
  },
  // 编辑用户表单
  {
    name: "UserEditorForm",
    options: {
      //   headerShown: false,
      headerShadowVisible: false,
    },
    component: UserEditorForm,
  },
  // 动态详情
  {
    name: "DeynamicDetails",
    options: {
      title: "动态详情",
      headerShadowVisible: false,
    },
    component: DeynamicDetails,
  },
  // 动态发布
  {
    name: "DynamicPublic",
    options: { title: "", headerShadowVisible: false },
    component: DynamicPublic,
  },
];
